/**
 * Created by csm on 2015/5/28.
 */
var Search = function(){
    return {
        init:function(){
            $('#StudentInfo').hide();
            $("#btn-SUID").click(function(){
                $.ajax({
                    url:'http://api.tansuyun.cn?i=9GetStudent&tsy='+getCookie('tsy'),
                    data:{SUID:$('#SUID').val()},
                    method:'post',
                    type:'json',
                    success:function(d){
                        if(d.c == 200){
                            $.each(d.d[0],function(n,v){
                                $('.'+n).html(v);
                            });
                            $('#StudentInfo').show();
                        }
                    },
                    error:function(){

                    }
                });
            });
        }
    };
}();